package cn.northsea.service;


import cn.northsea.model.buy.Buy;
import cn.northsea.model.logistics.Logistics;
import cn.northsea.model.material.Material;
import cn.northsea.model.material.Material_detail;
import cn.northsea.model.supplier.Supplier;
import cn.northsea.model.user.UserInfo;
import cn.northsea.model.warehouse.Warehouse;
import cn.northsea.vo.logistics.LogisticsQueryVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author abc
 * @since 2024-08-21
 */
public interface LogisticsService extends IService<Logistics> {

    //分页查询
    Map<String,Object> findPage(Page<Logistics> pageParam, LogisticsQueryVo courseQueryVo);

    /**
     * 导出
     * @param response
     */
    void exportData(HttpServletResponse response);

    //导入
    void importData(MultipartFile file);

    //更新物流状态
    void updateState(Long id, Integer state);


    //查询
    Buy getBuyByLogisticsId(Long id);

    List<Logistics> getLogisticsListByUserId(Long userId);

    Material getMaterialByBuyId(Long id);

    Supplier getSupplierByBuyId(Long id);

    Material_detail getMaterial_detailByMaterialId(Long id);

    Warehouse getWarehouseByMaterial_detailId(Long id);

    UserInfo getUserById(Long id);

    void addMaterialToWarehouse(Long id, Integer number);

}
